package com.hippoframework.utils;
import com.hippoframework.bean.ApplicationContext;
import com.hippoframework.bean.DefaultApplicationContext;
import lombok.Setter;

/**
 * ApplicationContext相关工具类
 *
 * @author TylerW
 * @date 4/16/2020 4:55 PM
 */
public class ApplicationContextUtils {

    private ApplicationContextUtils() {
    }

    @Setter
    private static ApplicationContext applicationContext;

    public static ApplicationContext getApplicationContext() {
        if (applicationContext == null) {
            applicationContext = new DefaultApplicationContext();
        }
        return applicationContext;
    }
}
